# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-zope-testrunner
_pkgname=zope.testrunner
pkgver=6.6
pkgrel=0
pkgdesc="Zope testrunner script"
options="!check" # Fails to run
url="https://github.com/zopefoundation/zope.testrunner"
arch="noarch"
license="ZPL-2.1"
depends="python3 py3-setuptools py3-zope-exceptions py3-zope-interface"
makedepends="py3-gpep517 py3-wheel"
checkdepends="py3-zope-testing"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare

	#Remove ancient python2.5 reference
	rm -rf $builddir/src/zope/testrunner/tests/testrunner-ex-251759
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4383955b18566d15994247ea92afd573079b7ecaa45f684c46296649d932b56c72d69d601df35964d3b16b6cdbb1766cbfc229a5ffc47250542ad0d460c2218a  zope.testrunner-6.6.tar.gz
"
